#!/bin/sh


start() {
    printf "Starting ZCU104 EtherBone server ..."
    /bin/zcu104_etherbone &
    touch /var/lock/zcu104_etherbone
    echo "OK"
}

stop() {
    printf "Stopping ZCU104 EtherBone server ..."
    killall zcu104_etherbone
    rm -f /var/lock/zcu104_etherbone
    echo "OK"
}

case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart|reload)
    stop
    start
    ;;
  *)
    echo $"Usage: $0 {start|stop|restart|reload}"
    exit 1
    ;;
esac

exit 0
